import commonService from 'service/common'
import Qs from 'querystring'
export default {
    //通话记录POST 开发完成 http://192.168.6.80/webapi/callRecord/memberByCustomerIDWithPage
    async getRecordCallList(data) {
        let dataObj = Object.assign({
            'customerID': '',
            "page": "1",
            "count": "10"
        }, data)
        let paramsJson = {
            baseURL: '/webapiThird',
            method: 'post',
            url: 'webapi/callRecord/memberByCustomerIDWithPage',
            data: dataObj
        }
        let jsondata = await commonService.asyncFetchData(paramsJson)
        return jsondata
    },
    //录音文件 根据callUUID查询录音url列表接口
    async getRecordVoiceDataByCallID(data) {
        let dataObj = Object.assign({
            'callUUID': ''
        }, data)

        let paramsJson = {
            baseURL: '/webapiThird',
            method: 'post',
            url: 'webapi/recording/memberByCallUUID',
            data: dataObj
        }
        let jsondata = await commonService.asyncFetchData(paramsJson)
        return jsondata
    },
    //录音文件 根据callUUID 和 分机号 查询录音url列表接口
    async getRecordVoiceUrlByCallIDAndExtNum(data) {
        let dataObj = Object.assign({
            'callUUID': '',
            'extNumber': ''
        }, data)
        dataObj = Qs.stringify(dataObj)
        let paramsJson = {
            baseURL: '/webapiThird',
            method: 'post',
            url: 'webapi/recording/memberByCallUUIDAndExtNumber',
            data: dataObj
        }
        let jsondata = await commonService.asyncFetchData(paramsJson)
        return jsondata
    },
    //根据学生ID 查询来电记录
    async getCallHistoryByCustomerId() {

    }
}